3.5 \(\int (a+a \sec (c+d x)) \, dx\)

Optimal. Leaf size=16 \[ \frac{a \tanh ^{-1}(\sin (c+d x))}{d}+a x \]

[Out]

a*x + (a*ArcTanh[Sin[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0072979, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3770} \[ \frac{a \tanh ^{-1}(\sin (c+d x))}{d}+a x \]

Antiderivative was successfully verified.

[In]

Int[a + a*Sec[c + d*x],x]

[Out]

a*x + (a*ArcTanh[Sin[c + d*x]])/d

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+a \sec (c+d x)) \, dx &=a x+a \int \sec (c+d x) \, dx\\ &=a x+\frac{a \tanh ^{-1}(\sin (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0015236, size = 16, normalized size = 1. \[ \frac{a \tanh ^{-1}(\sin (c+d x))}{d}+a x \]

Antiderivative was successfully verified.

[In]

Integrate[a + a*Sec[c + d*x],x]

[Out]

a*x + (a*ArcTanh[Sin[c + d*x]])/d

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 24, normalized size = 1.5 \begin{align*} ax+{\frac{a\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+a*sec(d*x+c),x)

[Out]

a*x+1/d*a*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.05706, size = 31, normalized size = 1.94 \begin{align*} a x + \frac{a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sec(d*x+c),x, algorithm="maxima")

[Out]

a*x + a*log(sec(d*x + c) + tan(d*x + c))/d

________________________________________________________________________________________

Fricas [B]  time = 1.76666, size = 95, normalized size = 5.94 \begin{align*} \frac{2 \, a d x + a \log \left (\sin \left (d x + c\right ) + 1\right ) - a \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sec(d*x+c),x, algorithm="fricas")

[Out]

1/2*(2*a*d*x + a*log(sin(d*x + c) + 1) - a*log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

Sympy [A]  time = 1.73496, size = 41, normalized size = 2.56 \begin{align*} a x + a \left (\begin{cases} \frac{\log{\left (\tan{\left (c + d x \right )} + \sec{\left (c + d x \right )} \right )}}{d} & \text{for}\: d \neq 0 \\\frac{x \left (\tan{\left (c \right )} \sec{\left (c \right )} + \sec ^{2}{\left (c \right )}\right )}{\tan{\left (c \right )} + \sec{\left (c \right )}} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sec(d*x+c),x)

[Out]

a*x + a*Piecewise((log(tan(c + d*x) + sec(c + d*x))/d, Ne(d, 0)), (x*(tan(c)*sec(c) + sec(c)**2)/(tan(c) + sec
(c)), True))

________________________________________________________________________________________

Giac [B]  time = 1.35175, size = 66, normalized size = 4.12 \begin{align*} a x + \frac{a{\left (\log \left ({\left | \frac{1}{\sin \left (d x + c\right )} + \sin \left (d x + c\right ) + 2 \right |}\right ) - \log \left ({\left | \frac{1}{\sin \left (d x + c\right )} + \sin \left (d x + c\right ) - 2 \right |}\right )\right )}}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+a*sec(d*x+c),x, algorithm="giac")

[Out]

a*x + 1/4*a*(log(abs(1/sin(d*x + c) + sin(d*x + c) + 2)) - log(abs(1/sin(d*x + c) + sin(d*x + c) - 2)))/d